<?php
/**
 * Configuration documentation and example.
 *
 * @author Martin "DevelX" Jurča
 * @version 2009-01-12
 */
interface Config {
    /**
     * This constant is set to true when the CMS has been succesfuly installed:
     * database connection is set and works, system has ftp access to its files
     * and all constants has been configured and system modules are installed
     * and fully operational.
     */
    const INSTALLED = false;

    /**
     * 70 bytes long actiovation key that confirms the system is used leggaly.
     * This correctness of the key is checked only by main repository server,
     * where it is also generated. When empty or not valid, site is not
     * considered activated and will not display public web, only
     * administration with activation notification. To see the correct form of
     * activation key, consult the Repository module administration.
     * Activation key and legality of site usage is checked periodically at
     * least once per day.
     */
    const ACTIVATION_KEY = '';

    /**
     * Absolute web-public path to CMS root directory. Never ends with slash.
     */
    const WEB_DIR = '';

    /**
     * Absolute local filesystem path to CMS root directory. Should never end
     * with a slash.
     */
    const ROOT = '/var/www';

    /**
     * Name of the domain at which the CMS is located. Does not beggin with
     * protocol specification (http://, https://, ...) and has no slash on its
     * end.
     */
    const DOMAIN_NAME = 'localhost';

    /**
     * Default local timezone.
     */
    const TIMEZONE = 'CET';

    /**
     * Default system language. This language is used for all localized labels
     * (if localization is available in this language) when session language
     * is not set or localization in session language is not available.
     */
    const DEFAULT_LANG = 'en';

    /**
     * Default and strongly recommended output character encoding.
     */
    const DEFAULT_CHARSET = 'utf-8';

    /**
     * When set to true and session language has not been set, the session
     * language should be set automatically according to Accept-language
     * header.
     */
    const AUTODETECT_SESSION_LANG = true;

    /**
     * When set to true and session charset has not been set, the session
     * charset should be set automatically according to Accept-charset header.
     */
    const AUTODETECT_SESSION_CHARSET = true;

    /**
     * Access string that defines how the database driver will connect to the
     * database.
     */
    const DATABASE_ACCESS = 'root:mypassword@localhost//cms';

    /**
     * Name of the database driver. This driver will be loaded from file
     * /libs/DBDriver<driver name>.php. The specified DBDriver should implement
     * the DBDriver interface.
     */
    const DATABASE_DRIVER = 'MySQLi';

    /**
     * Name of the ftp host for access of CMS root directory.
     */
    const FTP_HOST = 'localhost';

     /**
     * User login name for ftp access.
     */
    const FTP_LOGIN = 'root';

    /**
     * User password for ftp access.
     */
    const FTP_PASSWORD = 'mypassword';

    /**
     * Directory in which is the system localized. This path is used for ftp
     * access to system files and should never end with slash.
     */
    const FTP_DIRECTORY = '';

    /**
     * Sets the output quality for jpeg images.
     */
    const IMAGE_QUALITY = 80;

    /**
     * Default color of the image border - red part.
     */
    const IMAGE_BACKGROUND_R = 255;

    /**
     * Default color of the image border - green part.
     */
    const IMAGE_BACKGROUND_G = 255;

    /**
     * Default color of the image border - blue part.
     */
    const IMAGE_BACKGROUND_B = 255;

    /**
     * Maximum number of files in cache of each kind (image cache, output
     * cache, ...). If creation of another file is required, the oldes file
     * should be removed. May be set to -1 for no file number limit.
     */
    const MAX_CACHE_SIZE = 2000;

    /**
     * Number of second specifying how long should the data loaded from the
     * database be held in the cache. May be set to -1 for no time limit.
     */
    const CACHE_DB_TIMEOUT = 300;

    /**
     * Number of seconds specifing how long shoult the rendered page fractal be
     * held in the cache. Can be set to -1 for no time limit.
     */
    const CACHE_OUTPUT_TIMEOUT = 300;

    /**
     * Number of seconds specifing how long shoult the rendered image be held
     * in the cache. May be set to -1 for no time limit.
     */
    const CACHE_IMAGE_TIMEOUT = -1;

    /**
     * URL to the main repository. The CMS updates ale downloaded from this
     * repository.
     */
    const REPOSITORY = 'http://www.liweb.org/';

}
?>
